<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8">
		<title></title>
	</head>
	<body>
		<script type="text/javascript">
			(function(){
				console.log("立即执行");
			})();
			function fun1(x,y){
				return x-y;
			}
			var aaa=fun1(2,1)
			console.log(aaa)
			
			var fun2=function(n){
				var sum=0;
				for (let i = 1; i <=n; i++) {
					sum+=i;
				}
				console.log(sum);
			}
			
			var fun3=new Function("console.log('hello,pzhu')")
		</script>
		<button onclick="fun2(100)" type="button">100</button>
		<a href="javascript:fun3();">输出</a>
	</body>
</html>
